

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">

    <title>Options - LiterateCS</title>

	<link rel="icon" type="image/x-icon" href="../images/favicon.ico">
    <link rel="stylesheet" href="../bootstrap/css/readable/bootstrap.min.css" />
<link rel="stylesheet" href="../font-awesome/css/font-awesome.min.css">
<link rel="stylesheet" href="../sidebar/sidebar.min.css" />
<link rel="stylesheet" href="../css/book.min.css" />
<link rel="stylesheet" href="../syntax-highlight/solarized-light.min.css" />
<link rel="stylesheet" href="../mermaid/mermaid.css" />

</head>

<body>
    
    <nav class="navbar navbar-inverse navbar-fixed-top">
        <div class="container">
            <div class="navbar-header">
                <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar">
                    <span class="sr-only">Toggle navigation</span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                    <span class="icon-bar"></span>
                </button>
                <a class="navbar-brand" href="#sidebar-toggle" id="sidebar-toggle">
					<span>
						<img src="../images/favicon.ico" height="24" class="hidden-sm hidden-xs" />
						<i id="sidebar-toggle-icon" class="hidden-md hidden-lg hidden-xl fa fa-angle-double-right" aria-hidden="true"></i>
						LiterateCS
					</span>
				</a>
            </div>
            <div id="navbar" class="navbar-collapse collapse">
                <ul class="nav navbar-nav">
                    <li><a href="../index.html"><i class="fa fa-home" aria-hidden="true"></i> Home</a></li>
					<li><a href="https://github.com/johtela/LiterateCS"><i class="fa fa-github" aria-hidden="true"></i> GitHub Repository</a></li>
                    <li><a href="https://www.nuget.org/packages/LiterateCS/"><i class="fa fa-download" aria-hidden="true"></i> Download</a></li>
                    <li><a href="../License.html">License</a></li>
                </ul>
            </div>
        </div>
    </nav>

    <div class="container">
        <div class="row">
            <div id="sidebar" class="col-md-3 hidden-sm hidden-xs">
                
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4>On This Page</h4>
            </div>
            <div id="header-menu" class="panel-body main-menu">
                <ul></ul>
            </div>
        </div>  
        <div class="panel panel-default">
            <div class="panel-heading">
                <h4>Table of Contents</h4>
            </div>
            <div class="panel-body main-menu">
                <ul>
	<li><a href="../index.html">Home</a></li>
	<ul>
	</ul>
	<li><a href="../Introduction.html">Introduction</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/Options.html" class="selected">Command Line Options</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/Program.html">Main Program</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/SplitPath.html">SplitPath Structure</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/Weaver.html">Document Weaver</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/MdWeaver.html">Markdown Weaver</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/HtmlWeaver.html">HTML Weaver</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/TocManager.html">TOC Manager</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/BlockList.html">Source Blocks</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/Macro.html">Macros</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/BlockBuilder.html">Block Builder</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/HtmlBlockBuilder.html">HTML Block Builder</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS/HtmlGenerator.html">HTML Generation</a></li>
	<ul>
	</ul>
	<li>Themes</li>
	<ul>
<ul>
	<li><a href="../LiterateCS.Theme/DirHelpers.html">Directory Utilities</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS.Theme/Toc.html">Table of Contents Classes</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS.Theme/PageParams.html">Page Parameters</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS.Theme/Theme.html">Theme Base Class</a></li>
	<ul>
	</ul>
	<li><a href="../LiterateCS.Theme/LiterateException.html">Reporting Errors</a></li>
	<ul>
	</ul>
</ul>
	</ul>
	<li><a href="../FrontMatter.html">Front Matter</a></li>
	<ul>
	</ul>
	<li><a href="../TableOfContents.html">Table of Contents File</a></li>
	<ul>
	</ul>
	<li><a href="../TipsAndTricks.html">Tips &amp; Tricks</a></li>
	<ul>
	</ul>
	<li><a href="../License.html">License</a></li>
	<ul>
	</ul>
	<li><a href="../README.html">README</a></li>
	<ul>
	</ul>
	<li><a href="../Installation.html">Installation</a></li>
	<ul>
	</ul>
</ul>
            </div>
        </div>

            </div>
			<div id="contentarea" class="col-md-9 col-sm-12 col-sm-push-0 col-xs-12 col-xs-push-0">
				<ul class="pager">
	<li class="previous"><a href="../Introduction.html">Previous: Introduction</a></li>
	<li class="next"><a href="../LiterateCS/Program.html">Next: Main Program</a></li>
</ul>
				<div id="static-content" class="markdown">
					<h1 id="command-line-options-usage">Command Line Options &amp; Usage</h1>
<p>LiterateCS is a console tool and it is controlled primarily through command line options.
<a href="https://github.com/commandlineparser/commandline">Command Line Parser Library</a> is used to parse
the options. It simplifies the process and allows us to define new parameters just by adding
properties to the Option class.</p>
<h2 id="dependencies">Dependencies</h2>
<pre class="csharp"><code class="csharp"><span class="keyword" id="LiterateCS">namespace</span> LiterateCS
<span class="punctuation">{</span>
	<span class="keyword">using</span> System<span class="punctuation">;</span>
	<span class="keyword">using</span> System<span class="punctuation">.</span>Collections<span class="punctuation">.</span>Generic<span class="punctuation">;</span>
	<span class="keyword">using</span> System<span class="punctuation">.</span>IO<span class="punctuation">;</span>
	<span class="keyword">using</span> System<span class="punctuation">.</span>Linq<span class="punctuation">;</span>
	<span class="keyword">using</span> System<span class="punctuation">.</span>Reflection<span class="punctuation">;</span>
	<span class="keyword">using</span> ExtensionCord<span class="punctuation">;</span>
	<span class="keyword">using</span> CommandLine<span class="punctuation">;</span>
	<span class="keyword">using</span> CommandLine<span class="punctuation">.</span>Text<span class="punctuation">;</span>
	<span class="keyword">using</span> YamlDotNet<span class="punctuation">.</span>Core<span class="punctuation">;</span>
	<span class="keyword">using</span> YamlDotNet<span class="punctuation">.</span>Core<span class="punctuation">.</span>Events<span class="punctuation">;</span>
	<span class="keyword">using</span> YamlDotNet<span class="punctuation">.</span>Serialization<span class="punctuation">;</span>
	<span class="keyword">using</span> LiterateCS<span class="punctuation">.</span>Theme<span class="punctuation">;</span>
</code></pre>
<h2 id="output-format">Output Format</h2>
<p>The output format is either HTML or Markdown. The following enumeration is used to define
the possible options.</p>
<pre class="csharp"><code class="csharp">	<span class="keyword" id="LiterateCS.OutputFormat">public</span> <span class="keyword">enum</span> <span class="typename">OutputFormat</span> <span class="punctuation">{</span> <span id="LiterateCS.OutputFormat.md">md</span><span class="punctuation">,</span> <span id="LiterateCS.OutputFormat.html">html</span> <span class="punctuation">}</span>
</code></pre>
<h2 id="available-options">Available Options</h2>
<p>The Option class defines the available command line options as properties. These properties
are decorated by attributes that specify the short and long format of the option, whether
the option is mandatory or not, and the associated help text. Also, the name of the option
in a YAML file is specified. The type of an option (boolean, string, enumeration, etc.)
is inferred from the type of the associated property.</p>
<pre class="csharp"><code class="csharp">	<span class="keyword" id="LiterateCS.Options">public</span> <span class="keyword">class</span> <span class="typename">Options</span>
	<span class="punctuation">{</span>
</code></pre>
<p>There are two special input files which are processed separately. They
are	defined in <a href="http://yaml.org/">YAML</a> format and they have fixed names.
The first one is the <code>defaults.yml</code> file which contains the default settings
used by LiterateCS. This file will be processed before any of the other files,
so all the global (project-level) properties should be defined in it.</p>
<p>The first part of the file contains front matter defaults. See the chapter on
<a href="../FrontMatter.html">Front Matter</a> to learn about available properties. The
second part of the file contains the default command line arguments. The
processing order is that <code>defaults.yml</code> file will be read first and all the
command line arguments found there are used as default values. However, if
the same option is specified in the command line, it overrides the setting
found in the defaults file. If an option is not present in the defaults file
or in the command line, the application-level default value is used.</p>
<pre class="csharp"><code class="csharp">		<span class="keyword">public</span> <span class="keyword">const</span> <span class="keyword" data-toggle="tooltip" title="string">string</span> <span id="LiterateCS.Options.DefaultsFile">DefaultsFile</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;defaults.yml&quot;</span><span class="punctuation">;</span>
</code></pre>
<p>The other special file is the table of contents or <em>TOC</em> for short. Its file
name is <code>TOC.yml</code> and its structure is described in
<a href="../TableOfContents.html">its own section</a>. You can add entries to TOC manually,
or use the <code>-u</code> option to automatically update it when files are missing from it.</p>
<pre class="csharp"><code class="csharp">		<span class="keyword">public</span> <span class="keyword">const</span> <span class="keyword" data-toggle="tooltip" title="string">string</span> <span id="LiterateCS.Options.TocFile">TocFile</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;TOC.yml&quot;</span><span class="punctuation">;</span>
</code></pre>
<h3 id="filters-for-source-files">Filters for Source Files</h3>
<p>The arguments given without option specifiers <code>-</code> or <code>--</code> are assumed to be filters
that specify what files are processed by the tool. You can give multiple filters or file
names to be searched for. The filters may contain literal text and three kinds of
wildcards that conform to the <em>glob</em> convention:</p>
<ul>
<li><code>?</code> matches a single character.</li>
<li><code>*</code> matches zero or more occurrences of any character except <code>\</code>. So, this wild card
basically matches a part of a file or a directory name.</li>
<li><code>**</code> matches zero or more occurrences of any character including the backslash. This
wildcard can be used to select files that reside in subdirectories.</li>
</ul>
<p>The file names that are matched against the filters are given relative either to the
input folder or to the solution folder.</p>
<pre class="csharp"><code class="csharp">		<span class="keyword">private</span> <span class="typename" data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>">IEnumerable</span><span class="punctuation">&lt;</span><span class="keyword" data-toggle="tooltip" title="string">string</span><span class="punctuation">&gt;</span> <span id="LiterateCS.Options._filters">_filters</span><span class="punctuation">;</span>

		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="CommandLine.ValueAttribute">Value</span> <span class="punctuation">(</span><span class="number" data-toggle="tooltip" title="int">0</span><span class="punctuation">,</span> <span data-toggle="tooltip" title="string">MetaName</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;&lt;filters&gt;&quot;</span><span class="punctuation">,</span> 
		<span data-toggle="tooltip" title="string">HelpText</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;Filters for input files; both source and markdown.&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Serialization.YamlMemberAttribute">YamlMember</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">Alias</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;filters&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="keyword" id="LiterateCS.Options.Filters">public</span> <span class="typename" data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>">IEnumerable</span><span class="punctuation">&lt;</span><span class="keyword" data-toggle="tooltip" title="string">string</span><span class="punctuation">&gt;</span> Filters
		<span class="punctuation">{</span>
			<span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.Filters.get">get</span> <span class="punctuation">=&gt;</span> <span data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>"><a href="../LiterateCS/Options.html#LiterateCS.Options._filters">_filters</a></span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.Filters.get">;</span>
			<span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.Filters.set">set</span>
			<span class="punctuation">{</span>
</code></pre>
<p>This bit of logic prevents command line parser from overriding
filters read from <code>defaults.yml</code> with an empty list.</p>
<pre class="csharp"><code class="csharp">				<span class="keyword">if</span> <span class="punctuation">(</span><span class="punctuation" data-toggle="tooltip" title="bool">(</span><span data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>">value</span> <span class="punctuation" data-toggle="tooltip" title="bool">!=</span> <span class="keyword">null</span> <span class="punctuation" data-toggle="tooltip" title="bool">&amp;&amp;</span> <span data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>">value</span><span class="punctuation" data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>.Any<string>()">.</span><span data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>.Any<string>()">Any</span> <span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation" data-toggle="tooltip" title="bool">)</span> <span class="punctuation" data-toggle="tooltip" title="bool">||</span>
					<span data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>"><a href="../LiterateCS/Options.html#LiterateCS.Options._filters">_filters</a></span> <span class="punctuation" data-toggle="tooltip" title="bool">==</span> <span class="keyword">null</span> <span class="punctuation" data-toggle="tooltip" title="bool">||</span> <span data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>"><a href="../LiterateCS/Options.html#LiterateCS.Options._filters">_filters</a></span><span class="punctuation" data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>.None<string>()">.</span><span data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>.None<string>()">None</span> <span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">)</span>
					<span data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>"><a href="../LiterateCS/Options.html#LiterateCS.Options._filters">_filters</a></span> <span class="punctuation" data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>">=</span> <span data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>">value</span><span class="punctuation">;</span>
			<span class="punctuation">}</span>
		<span class="punctuation">}</span>
</code></pre>
<h3 id="solution-file">Solution File</h3>
<p>Instead of using the input folder get the files to be processed from a MSBuild
solution.</p>
<pre class="csharp"><code class="csharp">		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="CommandLine.OptionAttribute">Option</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="char">&#39;s&#39;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;solution&quot;</span><span class="punctuation">,</span> <span data-toggle="tooltip" title="bool">Required</span> <span class="punctuation">=</span> <span class="keyword" data-toggle="tooltip" title="bool">false</span><span class="punctuation">,</span>
		<span data-toggle="tooltip" title="string">HelpText</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;Read the the C# and markdown files from a msbuild solution (*.sln). &quot;</span> <span class="punctuation" data-toggle="tooltip" title="string">+</span>
		<span class="string" data-toggle="tooltip" title="string">&quot;If this option is specified, the &#39;--input&#39; option is ignored.&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Serialization.YamlMemberAttribute">YamlMember</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">Alias</span><span class="punctuation">=</span><span class="string" data-toggle="tooltip" title="string">&quot;solution&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="keyword" id="LiterateCS.Options.Solution">public</span> <span class="keyword" data-toggle="tooltip" title="string">string</span> Solution <span class="punctuation">{</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.Solution.get">get</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.Solution.get">;</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.Solution.set">set</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.Solution.set">;</span> <span class="punctuation">}</span>
</code></pre>
<h3 id="input-folder">Input Folder</h3>
<p>Input folder specifies the root of your source files. Typically you want to process
all the C# and markdown files in the source folder, so you define it with the <code>-i</code>
option and give <code>*.cs</code> and <code>*.md</code> as filters. If this option is omitted, the current
directory is assumed to be the input directory.</p>
<pre class="csharp"><code class="csharp">		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="CommandLine.OptionAttribute">Option</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="char">&#39;i&#39;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;input&quot;</span><span class="punctuation">,</span> <span data-toggle="tooltip" title="bool">Required</span> <span class="punctuation">=</span> <span class="keyword" data-toggle="tooltip" title="bool">false</span><span class="punctuation">,</span>
		<span data-toggle="tooltip" title="string">HelpText</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;The root folder for the files to be processed. Files under this &quot;</span> <span class="punctuation" data-toggle="tooltip" title="string">+</span>
		<span class="string" data-toggle="tooltip" title="string">&quot;directory are checked against the filters. If input folder is not specified, the &quot;</span> <span class="punctuation" data-toggle="tooltip" title="string">+</span>
		<span class="string" data-toggle="tooltip" title="string">&quot;current directory is used.&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Serialization.YamlMemberAttribute">YamlMember</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">Alias</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;input&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="keyword" id="LiterateCS.Options.InputFolder">public</span> <span class="keyword" data-toggle="tooltip" title="string">string</span> InputFolder <span class="punctuation">{</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.InputFolder.get">get</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.InputFolder.get">;</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.InputFolder.set">set</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.InputFolder.set">;</span> <span class="punctuation">}</span>
</code></pre>
<h3 id="output-folder">Output Folder</h3>
<p>The output folder specifies where the tool stores the generated files. The output
folder will contain the markdown and HTML files, as well as all the auxiliary files
(CSS, Javascript, etc.)	needed by the documents. If a relative path is specified,
then it is relative to the input folder or solution folder. If nothing is specified,
the default output folder is set to &quot;docs/&quot; under the input folder.</p>
<pre class="csharp"><code class="csharp">		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="CommandLine.OptionAttribute">Option</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="char">&#39;o&#39;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;output&quot;</span><span class="punctuation">,</span> <span data-toggle="tooltip" title="bool">Required</span> <span class="punctuation">=</span> <span class="keyword" data-toggle="tooltip" title="bool">false</span><span class="punctuation">,</span>
		<span data-toggle="tooltip" title="string">HelpText</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;Output folder where the documentation will be generated to. &quot;</span><span class="punctuation" data-toggle="tooltip" title="string">+</span> 
		<span class="string" data-toggle="tooltip" title="string">&quot;The default output folder is &lt;input|solutionfolder&gt;/docs.&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Serialization.YamlMemberAttribute">YamlMember</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">Alias</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;output&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="keyword" id="LiterateCS.Options.OutputFolder">public</span> <span class="keyword" data-toggle="tooltip" title="string">string</span> OutputFolder <span class="punctuation">{</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.OutputFolder.get">get</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.OutputFolder.get">;</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.OutputFolder.set">set</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.OutputFolder.set">;</span> <span class="punctuation">}</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;docs&quot;</span><span class="punctuation">;</span>
</code></pre>
<h3 id="source-file-extension">Source File Extension</h3>
<p>LiterateCS needs to recognize which of the input files are source (C#) files, and
which ones are markdown files. Typically source files have the <code>.cs</code> extension. If
you are using a different file extension, you can specify it with the <code>-e</code> option.</p>
<pre class="csharp"><code class="csharp">		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="CommandLine.OptionAttribute">Option</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="char">&#39;e&#39;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;csext&quot;</span><span class="punctuation">,</span>
		<span data-toggle="tooltip" title="string">HelpText</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;File extension for the C# source files. Used to identify source files &quot;</span> <span class="punctuation" data-toggle="tooltip" title="string">+</span>
		<span class="string" data-toggle="tooltip" title="string">&quot;in the input folder. The default is &#39;.cs&#39;&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Serialization.YamlMemberAttribute">YamlMember</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">Alias</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;csext&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="keyword" id="LiterateCS.Options.SourceExt">public</span> <span class="keyword" data-toggle="tooltip" title="string">string</span> SourceExt <span class="punctuation">{</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.SourceExt.get">get</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.SourceExt.get">;</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.SourceExt.set">set</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.SourceExt.set">;</span> <span class="punctuation">}</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;.cs&quot;</span><span class="punctuation">;</span>
</code></pre>
<h3 id="markdown-file-extension">Markdown File Extension</h3>
<p>Similarly to C# files, markdown files are recognized by the file extension. If not
specified, <code>.md</code> is assumed to be the extension.</p>
<pre class="csharp"><code class="csharp">		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="CommandLine.OptionAttribute">Option</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="char">&#39;d&#39;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;mdext&quot;</span><span class="punctuation">,</span>
		<span data-toggle="tooltip" title="string">HelpText</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;File extension for the markdown files. Used to identify markdown files &quot;</span> <span class="punctuation" data-toggle="tooltip" title="string">+</span>
		<span class="string" data-toggle="tooltip" title="string">&quot;in the input folder. The default is &#39;.md&#39;&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Serialization.YamlMemberAttribute">YamlMember</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">Alias</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;mdext&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="keyword" id="LiterateCS.Options.MarkdownExt">public</span> <span class="keyword" data-toggle="tooltip" title="string">string</span> MarkdownExt <span class="punctuation">{</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.MarkdownExt.get">get</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.MarkdownExt.get">;</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.MarkdownExt.set">set</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.MarkdownExt.set">;</span> <span class="punctuation">}</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;.md&quot;</span><span class="punctuation">;</span>
</code></pre>
<h3 id="output-format">Output Format</h3>
<p>Output format is specified by the <code>-f</code> option. Only valid values are <code>md</code> for markdown
and <code>html</code> for HTML documents.</p>
<pre class="csharp"><code class="csharp">		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="CommandLine.OptionAttribute">Option</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="char">&#39;f&#39;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;format&quot;</span><span class="punctuation">,</span> 
		<span data-toggle="tooltip" title="string">HelpText</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;Format of the outputted documentation; either &#39;md&#39; or &#39;html&#39;. &quot;</span> <span class="punctuation" data-toggle="tooltip" title="string">+</span>
		<span class="string" data-toggle="tooltip" title="string">&quot;Default is &#39;md&#39;&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Serialization.YamlMemberAttribute">YamlMember</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">Alias</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;format&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="keyword" id="LiterateCS.Options.Format">public</span> <span class="typename" data-toggle="tooltip" title="LiterateCS.OutputFormat"><a href="../LiterateCS/Options.html#LiterateCS.OutputFormat">OutputFormat</a></span> Format <span class="punctuation">{</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.Format.get">get</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.Format.get">;</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.Format.set">set</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.Format.set">;</span> <span class="punctuation">}</span>
</code></pre>
<h3 id="comment-trimming">Comment Trimming</h3>
<p>The <code>--trim</code> argument indicates whether comments extracted from the source files will be
left-trimmed. Visual Studio likes to indent the comment blocks automatically to the same
level as the code. When these comment lines are extracted they will contain the leading
spaces or tabs that appear in the source file. If not trimmed, these lines will be
interpreted as code blocks in the markdown, which is not what we usually want. So, if you
have indented comments that you want to be considered as normal text in markdown, include
this option in your arguments.</p>
<pre class="csharp"><code class="csharp">		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="CommandLine.OptionAttribute">Option</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="char">&#39;t&#39;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;trim&quot;</span><span class="punctuation">,</span> 
		<span data-toggle="tooltip" title="string">HelpText</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;Left-trim the comments before processing them to avoid interpreting &quot;</span> <span class="punctuation" data-toggle="tooltip" title="string">+</span>
		<span class="string" data-toggle="tooltip" title="string">&quot;them as code blocks.&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Serialization.YamlMemberAttribute">YamlMember</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">Alias</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;trim&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="keyword" id="LiterateCS.Options.Trim">public</span> <span class="keyword" data-toggle="tooltip" title="bool">bool</span> Trim <span class="punctuation">{</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.Trim.get">get</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.Trim.get">;</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.Trim.set">set</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.Trim.set">;</span> <span class="punctuation">}</span>
</code></pre>
<h3 id="update-toc">Update TOC</h3>
<p>If you want LiterateCS to automatically add the files it processes to the table of
contents file (<code>TOC.yml</code>), enable this option. This makes maintaining the TOC file
easier and reminds you to update it after new files have been added.</p>
<pre class="csharp"><code class="csharp">		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="CommandLine.OptionAttribute">Option</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="char">&#39;u&#39;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;updatetoc&quot;</span><span class="punctuation">,</span> 
		<span data-toggle="tooltip" title="string">HelpText</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;Adds processed files that are not already in the TOC file to it.&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Serialization.YamlMemberAttribute">YamlMember</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">Alias</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;updatetoc&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="keyword" id="LiterateCS.Options.UpdateToc">public</span> <span class="keyword" data-toggle="tooltip" title="bool">bool</span> UpdateToc <span class="punctuation">{</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.UpdateToc.get">get</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.UpdateToc.get">;</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.UpdateToc.set">set</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.UpdateToc.set">;</span> <span class="punctuation">}</span>
</code></pre>
<h3 id="theme">Theme</h3>
<p>Themes are .NET assemblies which transform parsed code and text into HTML documents
using page templates. In addition, themes manage the auxiliary CSS, JS, and font files
that need to be copied to the target folder. The default theme is provided by LiterateCS,
but if you want, you can clone it and customize it to your liking.	The <code>--theme</code> option
should be specified, if you want to use a custom theme.</p>
<pre class="csharp"><code class="csharp">		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="CommandLine.OptionAttribute">Option</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="char">&#39;m&#39;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;theme&quot;</span><span class="punctuation">,</span>
		<span data-toggle="tooltip" title="string">HelpText</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;The theme DLL which generates HTML documents according to page &quot;</span> <span class="punctuation" data-toggle="tooltip" title="string">+</span>
		<span class="string" data-toggle="tooltip" title="string">&quot;templates. If not specified, the default theme is used.&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Serialization.YamlMemberAttribute">YamlMember</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">Alias</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;theme&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="keyword" id="LiterateCS.Options.Theme">public</span> <span class="keyword" data-toggle="tooltip" title="string">string</span> Theme <span class="punctuation">{</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.Theme.get">get</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.Theme.get">;</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.Theme.set">set</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.Theme.set">;</span> <span class="punctuation">}</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;DefaultTheme.dll&quot;</span><span class="punctuation">;</span>
</code></pre>
<h3 id="build-log">Build Log</h3>
<p>When a solution file is used as an input, LiterateCS first builds the solution to
determine all its dependencies. If you want to get a log file of the build for
troubleshooting, use the <code>--buildlog</code> option.</p>
<pre class="csharp"><code class="csharp">		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="CommandLine.OptionAttribute">Option</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="char">&#39;b&#39;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;buildlog&quot;</span><span class="punctuation">,</span> <span data-toggle="tooltip" title="bool">Required</span> <span class="punctuation">=</span> <span class="keyword" data-toggle="tooltip" title="bool">false</span><span class="punctuation">,</span>
		<span data-toggle="tooltip" title="string">HelpText</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;Path to the build log file.&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Serialization.YamlMemberAttribute">YamlMember</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">Alias</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;buildlog&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="keyword" id="LiterateCS.Options.BuildLog">public</span> <span class="keyword" data-toggle="tooltip" title="string">string</span> BuildLog <span class="punctuation">{</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.BuildLog.get">get</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.BuildLog.get">;</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.BuildLog.set">set</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.BuildLog.set">;</span> <span class="punctuation">}</span>
</code></pre>
<h3 id="verbose-mode">Verbose Mode</h3>
<p>If you want the tool to output information as it processes files, you can use the
verbose option.</p>
<pre class="csharp"><code class="csharp">		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="CommandLine.OptionAttribute">Option</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="char">&#39;v&#39;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;verbose&quot;</span><span class="punctuation">,</span>
		<span data-toggle="tooltip" title="string">HelpText</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;Outputs information about processed files to the standard output.&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Serialization.YamlMemberAttribute">YamlMember</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">Alias</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;verbose&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="keyword" id="LiterateCS.Options.Verbose">public</span> <span class="keyword" data-toggle="tooltip" title="bool">bool</span> Verbose <span class="punctuation">{</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.Verbose.get">get</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.Verbose.get">;</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.Verbose.set">set</span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options.Verbose.set">;</span> <span class="punctuation">}</span>
</code></pre>
<h2 id="split-file-paths">Split File Paths</h2>
<p>In order to make reading and parsing of the file and directory paths simpler, we will	
define few helper properties that present them as <a href="SplitPath.html">SplitPath</a>
structures. The idea behind this data type is explained on its own documentation page,
but in a nutshell its main purpose is to separate the two parts of a file path: the
absolute base path and the relative file path. Doing this makes the code that needs
these paths more succinct and readable. It also makes converting paths to hyperlinks
easier.</p>
<p>The files produced by LiterateCS are stored in a similar directory hierarchy as the
input files. The base directory for the input files is defined by the <code>-i</code> option, or
if a solution file is provided (with the <code>-s</code> option), the base input directory will
be the one where the solution file resides. If neither is given, the current directory
is used as the base input path.</p>
<pre class="csharp"><code class="csharp">		<span class="keyword" id="LiterateCS.Options.InputPath">public</span> <span class="typename" data-toggle="tooltip" title="LiterateCS.SplitPath"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span> InputPath <span class="punctuation">=&gt;</span>
			<span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.Solution">Solution</a></span> <span class="punctuation" data-toggle="tooltip" title="bool">!=</span> <span class="keyword">null</span> <span class="punctuation" data-toggle="tooltip" title="LiterateCS.SplitPath">?</span> <span class="typename" data-toggle="tooltip" title="LiterateCS.SplitPath"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.SplitPath.Base(string)">.</span><span data-toggle="tooltip" title="LiterateCS.SplitPath.Base(string)"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath.Base(string)">Base</a></span> <span class="punctuation">(</span><span class="typename" data-toggle="tooltip" title="System.IO.Path">Path</span><span class="punctuation" data-toggle="tooltip" title="System.IO.Path.GetDirectoryName(string)">.</span><span data-toggle="tooltip" title="System.IO.Path.GetDirectoryName(string)">GetDirectoryName</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.Solution">Solution</a></span><span class="punctuation">)</span><span class="punctuation">)</span> <span class="punctuation" data-toggle="tooltip" title="LiterateCS.SplitPath">:</span>
			<span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.InputFolder">InputFolder</a></span> <span class="punctuation" data-toggle="tooltip" title="bool">!=</span> <span class="keyword">null</span> <span class="punctuation" data-toggle="tooltip" title="LiterateCS.SplitPath">?</span> <span class="typename" data-toggle="tooltip" title="LiterateCS.SplitPath"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.SplitPath.Base(string)">.</span><span data-toggle="tooltip" title="LiterateCS.SplitPath.Base(string)"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath.Base(string)">Base</a></span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.InputFolder">InputFolder</a></span><span class="punctuation">)</span> <span class="punctuation" data-toggle="tooltip" title="LiterateCS.SplitPath">:</span>
			<span class="typename" data-toggle="tooltip" title="LiterateCS.SplitPath"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.SplitPath.Base(string)">.</span><span data-toggle="tooltip" title="LiterateCS.SplitPath.Base(string)"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath.Base(string)">Base</a></span> <span class="punctuation">(</span><span class="typename" data-toggle="tooltip" title="System.IO.Directory">Directory</span><span class="punctuation" data-toggle="tooltip" title="System.IO.Directory.GetCurrentDirectory()">.</span><span data-toggle="tooltip" title="System.IO.Directory.GetCurrentDirectory()">GetCurrentDirectory</span> <span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">)</span><span class="punctuation">;</span>
</code></pre>
<p>The output base path is given with the mandatory <code>-o</code> option. The <code>OutputPath</code> property
just wraps it inside the <code>SplitPath</code> structure.</p>
<pre class="csharp"><code class="csharp">		<span class="keyword" id="LiterateCS.Options.OutputPath">public</span> <span class="typename" data-toggle="tooltip" title="LiterateCS.SplitPath"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span> OutputPath <span class="punctuation">=&gt;</span>
			<span class="typename" data-toggle="tooltip" title="LiterateCS.SplitPath"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.SplitPath.Base(string)">.</span><span data-toggle="tooltip" title="LiterateCS.SplitPath.Base(string)"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath.Base(string)">Base</a></span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.OutputFolder">OutputFolder</a></span><span class="punctuation">)</span><span class="punctuation">;</span>
</code></pre>
<p>Lastly, the theme path is constructed. The base path of the theme is the directory
where the theme DLL resides. If the theme path given as an option is not an absolute
one, it is assumed that the path points to a folder under the application directory
(where the executables reside).</p>
<pre class="csharp"><code class="csharp">		<span class="keyword" id="LiterateCS.Options.ThemePath">public</span> <span class="typename" data-toggle="tooltip" title="LiterateCS.SplitPath"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span> ThemePath
		<span class="punctuation">{</span>
			<span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.ThemePath.get">get</span>
			<span class="punctuation">{</span>
				<span class="keyword" data-toggle="tooltip" title="string">var</span> <span id="fullPath">fullPath</span> <span class="punctuation">=</span> <span class="typename" data-toggle="tooltip" title="System.IO.Path">Path</span><span class="punctuation" data-toggle="tooltip" title="System.IO.Path.IsPathRooted(string)">.</span><span data-toggle="tooltip" title="System.IO.Path.IsPathRooted(string)">IsPathRooted</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.Theme">Theme</a></span><span class="punctuation">)</span> <span class="punctuation" data-toggle="tooltip" title="string">?</span> <span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.Theme">Theme</a></span> <span class="punctuation" data-toggle="tooltip" title="string">:</span>
					<span class="typename" data-toggle="tooltip" title="System.IO.Path">Path</span><span class="punctuation" data-toggle="tooltip" title="System.IO.Path.Combine(string, string)">.</span><span data-toggle="tooltip" title="System.IO.Path.Combine(string, string)">Combine</span> <span class="punctuation">(</span>
						<span class="typename" data-toggle="tooltip" title="System.IO.Path">Path</span><span class="punctuation" data-toggle="tooltip" title="System.IO.Path.GetDirectoryName(string)">.</span><span data-toggle="tooltip" title="System.IO.Path.GetDirectoryName(string)">GetDirectoryName</span> <span class="punctuation">(</span><span class="typename" data-toggle="tooltip" title="System.Reflection.Assembly">Assembly</span><span class="punctuation" data-toggle="tooltip" title="System.Reflection.Assembly.GetEntryAssembly()">.</span><span data-toggle="tooltip" title="System.Reflection.Assembly.GetEntryAssembly()">GetEntryAssembly</span> <span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation" data-toggle="tooltip" title="string">.</span><span data-toggle="tooltip" title="string">Location</span><span class="punctuation">)</span><span class="punctuation">,</span> 
						<span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.Theme">Theme</a></span><span class="punctuation">)</span><span class="punctuation">;</span>
				<span class="keyword">return</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.SplitPath">new</span> <span class="typename"><a href="../LiterateCS/SplitPath.html#LiterateCS.SplitPath">SplitPath</a></span> <span class="punctuation">(</span><span class="typename" data-toggle="tooltip" title="System.IO.Path">Path</span><span class="punctuation" data-toggle="tooltip" title="System.IO.Path.GetDirectoryName(string)">.</span><span data-toggle="tooltip" title="System.IO.Path.GetDirectoryName(string)">GetDirectoryName</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">fullPath</span><span class="punctuation">)</span><span class="punctuation">,</span>
					<span class="typename" data-toggle="tooltip" title="System.IO.Path">Path</span><span class="punctuation" data-toggle="tooltip" title="System.IO.Path.GetFileName(string)">.</span><span data-toggle="tooltip" title="System.IO.Path.GetFileName(string)">GetFileName</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">fullPath</span><span class="punctuation">)</span><span class="punctuation">)</span><span class="punctuation">;</span>
			<span class="punctuation">}</span>
		<span class="punctuation">}</span>
</code></pre>
<h2 id="loading-command-line-options-from-defaults.yml">Loading Command Line Options from <code>defaults.yml</code></h2>
<p>Typically you run the <code>literatecs</code> command with the same options again and
again. For this reason, it is usually easier to specify the options in the
<code>defaults.yml</code> file. You can still override the options in the command line
if desired, but the initial values will be fetched from the	defaults file.
If it does not appear there either, the application default is used.</p>
<pre class="csharp"><code class="csharp">		<span class="keyword" id="LiterateCS.Options.LoadFromDefaultsFile()" data-toggle="tooltip" title="LiterateCS.Options.LoadFromDefaultsFile()">public</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options.LoadFromDefaultsFile()">static</span> <span class="typename" data-toggle="tooltip" title="LiterateCS.Options"><a href="../LiterateCS/Options.html#LiterateCS.Options">Options</a></span> <span data-toggle="tooltip" title="LiterateCS.Options.LoadFromDefaultsFile()">LoadFromDefaultsFile</span> <span class="punctuation">(</span><span class="punctuation">)</span>
		<span class="punctuation">{</span>
			<span class="keyword">if</span> <span class="punctuation">(</span><span class="punctuation" data-toggle="tooltip" title="bool">!</span><span class="typename" data-toggle="tooltip" title="System.IO.File">File</span><span class="punctuation" data-toggle="tooltip" title="System.IO.File.Exists(string)">.</span><span data-toggle="tooltip" title="System.IO.File.Exists(string)">Exists</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.DefaultsFile">DefaultsFile</a></span><span class="punctuation">)</span><span class="punctuation">)</span>
				<span class="keyword">return</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options">new</span> <span class="typename"><a href="../LiterateCS/Options.html#LiterateCS.Options">Options</a></span> <span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">;</span>
			<span class="typename" data-toggle="tooltip" title="System.Console">Console</span><span class="punctuation" data-toggle="tooltip" title="System.Console.WriteLine(string, object)">.</span><span data-toggle="tooltip" title="System.Console.WriteLine(string, object)">WriteLine</span> <span class="punctuation">(</span><span class="string" data-toggle="tooltip" title="string">&quot;Reading default command line options from &#39;{0}&#39;&quot;</span><span class="punctuation">,</span> 
				<span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.DefaultsFile">DefaultsFile</a></span><span class="punctuation">)</span><span class="punctuation">;</span>
			<span class="keyword">try</span>
			<span class="punctuation">{</span>
</code></pre>
<p>We use the <a href="https://github.com/aaubry/YamlDotNet/wiki/Samples.DeserializingMultipleDocuments">YamlDotNet serialization</a>
to read the file.</p>
<pre class="csharp"><code class="csharp">				<span class="keyword">using</span> <span class="punctuation">(</span><span class="keyword" data-toggle="tooltip" title="System.IO.StreamReader">var</span> <span id="input">input</span> <span class="punctuation">=</span> <span class="typename" data-toggle="tooltip" title="System.IO.File">File</span><span class="punctuation" data-toggle="tooltip" title="System.IO.File.OpenText(string)">.</span><span data-toggle="tooltip" title="System.IO.File.OpenText(string)">OpenText</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.DefaultsFile">DefaultsFile</a></span><span class="punctuation">)</span><span class="punctuation">)</span>
				<span class="punctuation">{</span>
					<span class="keyword" data-toggle="tooltip" title="YamlDotNet.Serialization.IDeserializer">var</span> <span id="deserializer">deserializer</span> <span class="punctuation">=</span> <span class="keyword" data-toggle="tooltip" title="YamlDotNet.Serialization.DeserializerBuilder">new</span> <span class="typename">DeserializerBuilder</span> <span class="punctuation">(</span><span class="punctuation">)</span>
							<span class="punctuation" data-toggle="tooltip" title="YamlDotNet.Serialization.DeserializerBuilder.Build()">.</span><span data-toggle="tooltip" title="YamlDotNet.Serialization.DeserializerBuilder.Build()">Build</span> <span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">;</span>
					<span class="keyword" data-toggle="tooltip" title="YamlDotNet.Core.Parser">var</span> <span id="parser">parser</span> <span class="punctuation">=</span> <span class="keyword" data-toggle="tooltip" title="YamlDotNet.Core.Parser">new</span> YamlDotNet<span class="punctuation">.</span>Core<span class="punctuation">.</span><span class="typename">Parser</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="System.IO.StreamReader">input</span><span class="punctuation">)</span><span class="punctuation">;</span>
</code></pre>
<p>We skip the first document, which contains the front matter defaults.</p>
<pre class="csharp"><code class="csharp">					<span data-toggle="tooltip" title="YamlDotNet.Core.Parser">parser</span><span class="punctuation" data-toggle="tooltip" title="YamlDotNet.Core.IParser.Expect<YamlDotNet.Core.Events.StreamStart>()">.</span><span data-toggle="tooltip" title="YamlDotNet.Core.IParser.Expect<YamlDotNet.Core.Events.StreamStart>()">Expect</span><span class="punctuation">&lt;</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Core.Events.StreamStart">StreamStart</span><span class="punctuation">&gt;</span> <span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">;</span>
					<span data-toggle="tooltip" title="YamlDotNet.Serialization.IDeserializer">deserializer</span><span class="punctuation" data-toggle="tooltip" title="YamlDotNet.Serialization.IDeserializer.Deserialize<System.Collections.Generic.Dictionary<string, string>>(YamlDotNet.Core.IParser)">.</span><span data-toggle="tooltip" title="YamlDotNet.Serialization.IDeserializer.Deserialize<System.Collections.Generic.Dictionary<string, string>>(YamlDotNet.Core.IParser)">Deserialize</span><span class="punctuation">&lt;</span><span class="typename" data-toggle="tooltip" title="System.Collections.Generic.Dictionary<string, string>">Dictionary</span><span class="punctuation">&lt;</span><span class="keyword" data-toggle="tooltip" title="string">string</span><span class="punctuation">,</span> <span class="keyword" data-toggle="tooltip" title="string">string</span><span class="punctuation">&gt;</span><span class="punctuation">&gt;</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="YamlDotNet.Core.Parser">parser</span><span class="punctuation">)</span><span class="punctuation">;</span>
</code></pre>
<p>Then we can deserialize the default command line options.</p>
<pre class="csharp"><code class="csharp">					<span class="keyword" data-toggle="tooltip" title="LiterateCS.Options">var</span> <span id="result">result</span> <span class="punctuation">=</span> <span data-toggle="tooltip" title="YamlDotNet.Serialization.IDeserializer">deserializer</span>
						<span class="punctuation" data-toggle="tooltip" title="YamlDotNet.Serialization.IDeserializer.Deserialize<LiterateCS.Options>(YamlDotNet.Core.IParser)">.</span><span data-toggle="tooltip" title="YamlDotNet.Serialization.IDeserializer.Deserialize<LiterateCS.Options>(YamlDotNet.Core.IParser)">Deserialize</span><span class="punctuation">&lt;</span><span class="typename" data-toggle="tooltip" title="LiterateCS.Options"><a href="../LiterateCS/Options.html#LiterateCS.Options">Options</a></span><span class="punctuation">&gt;</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="YamlDotNet.Core.Parser">parser</span><span class="punctuation">)</span><span class="punctuation">;</span>
</code></pre>
<p>If no settings could be found, we return an Option object initialized
with application-level defaults.</p>
<pre class="csharp"><code class="csharp">					<span class="keyword">return</span> <span data-toggle="tooltip" title="LiterateCS.Options">result</span> <span class="punctuation" data-toggle="tooltip" title="LiterateCS.Options">??</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Options">new</span> <span class="typename"><a href="../LiterateCS/Options.html#LiterateCS.Options">Options</a></span> <span class="punctuation">(</span><span class="punctuation">)</span><span class="punctuation">;</span>
				<span class="punctuation">}</span>
			<span class="punctuation">}</span>
			<span class="keyword">catch</span> <span class="punctuation">(</span><span class="typename" data-toggle="tooltip" title="YamlDotNet.Core.YamlException">YamlException</span> e<span class="punctuation">)</span>
			<span class="punctuation">{</span>
				<span class="keyword">throw</span> <span class="keyword" data-toggle="tooltip" title="LiterateCS.Theme.LiterateException">new</span> <span class="typename"><a href="../LiterateCS.Theme/LiterateException.html#LiterateCS.Theme.LiterateException">LiterateException</a></span> <span class="punctuation">(</span>
					<span class="string" data-toggle="tooltip" title="string">&quot;Invalid syntax in the &#39;defaults.yml&#39; file. Make sure that the YAML data &quot;</span> <span class="punctuation" data-toggle="tooltip" title="string">+</span>
					<span class="string" data-toggle="tooltip" title="string">&quot;is defined according to the specification.&quot;</span><span class="punctuation">,</span>
					<span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.DefaultsFile">DefaultsFile</a></span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;http://yaml.org/&quot;</span><span class="punctuation">,</span> <span data-toggle="tooltip" title="YamlDotNet.Core.YamlException">e</span><span class="punctuation">)</span><span class="punctuation">;</span>
			<span class="punctuation">}</span>
		<span class="punctuation">}</span>
</code></pre>
<p>After both defaults file and command line argument are parsed, it is good
to check that all effective options are correct. For that we will provide a
method that outputs all the options as a command line. We utilize the new
feature in the Command Line Parser library, which
&quot;<a href="https://github.com/commandlineparser/commandline/wiki#usage-attribute">unparses</a>&quot;
the option object back to command line arguments.</p>
<pre class="csharp"><code class="csharp">		<span class="keyword" id="LiterateCS.Options.OutputEffectiveOptions()" data-toggle="tooltip" title="LiterateCS.Options.OutputEffectiveOptions()">public</span> <span class="keyword" data-toggle="tooltip" title="void">void</span> <span data-toggle="tooltip" title="LiterateCS.Options.OutputEffectiveOptions()">OutputEffectiveOptions</span> <span class="punctuation">(</span><span class="punctuation">)</span>
		<span class="punctuation">{</span>
			<span class="typename" data-toggle="tooltip" title="System.Console">Console</span><span class="punctuation" data-toggle="tooltip" title="System.Console.WriteLine(string)">.</span><span data-toggle="tooltip" title="System.Console.WriteLine(string)">WriteLine</span> <span class="punctuation">(</span><span class="string" data-toggle="tooltip" title="string">&quot;Command line options used:&quot;</span><span class="punctuation">)</span><span class="punctuation">;</span>
			<span class="typename" data-toggle="tooltip" title="System.Console">Console</span><span class="punctuation" data-toggle="tooltip" title="System.Console.WriteLine(string)">.</span><span data-toggle="tooltip" title="System.Console.WriteLine(string)">WriteLine</span> <span class="punctuation">(</span>CommandLine<span class="punctuation" data-toggle="tooltip" title="CommandLine.Parser">.</span><span class="typename" data-toggle="tooltip" title="CommandLine.Parser">Parser</span><span class="punctuation" data-toggle="tooltip" title="CommandLine.Parser">.</span><span data-toggle="tooltip" title="CommandLine.Parser">Default</span><span class="punctuation" data-toggle="tooltip" title="CommandLine.Parser.FormatCommandLine<LiterateCS.Options>(LiterateCS.Options)">.</span><span data-toggle="tooltip" title="CommandLine.Parser.FormatCommandLine<LiterateCS.Options>(LiterateCS.Options)">FormatCommandLine</span> <span class="punctuation">(</span><span class="keyword" data-toggle="tooltip" title="LiterateCS.Options">this</span><span class="punctuation">)</span><span class="punctuation">)</span><span class="punctuation">;</span>
		<span class="punctuation">}</span>
</code></pre>
<h2 id="usage-examples">Usage Examples</h2>
<p>Below are some example command lines for the most common usage scenarios.</p>
<pre class="csharp"><code class="csharp">		<span class="punctuation">[</span><span class="typename" data-toggle="tooltip" title="CommandLine.Text.UsageAttribute">Usage</span> <span class="punctuation">(</span><span data-toggle="tooltip" title="string">ApplicationAlias</span> <span class="punctuation">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;literatecs&quot;</span><span class="punctuation">)</span><span class="punctuation">]</span>
		<span class="keyword" id="LiterateCS.Options.Examples">public</span> <span class="keyword">static</span> <span class="typename" data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<CommandLine.Text.Example>">IEnumerable</span><span class="punctuation">&lt;</span><span class="typename" data-toggle="tooltip" title="CommandLine.Text.Example">Example</span><span class="punctuation">&gt;</span> Examples <span class="punctuation">=&gt;</span>
			<span class="keyword" data-toggle="tooltip" title="CommandLine.Text.Example[]">new</span> <span class="typename" data-toggle="tooltip" title="CommandLine.Text.Example">Example</span><span class="punctuation">[</span><span data-toggle="tooltip" title="?"></span><span class="punctuation">]</span>
			<span class="punctuation">{</span>
</code></pre>
<h3 id="create-markdown-output">Create Markdown Output</h3>
<p>The following command line processes all C# and markdown files in a
solution (including all projects and subfolders), and generates markdown
output to a directory called &quot;docs&quot;. It also includes the <code>-t</code> switch to
strip the indentation from the comments. This setting is usually on.</p>
<pre><code>literatecs **.cs **.md -s &lt;solution&gt;.sln -o docs -f md -t
</code></pre>
<p>Below we construct this example using an instance of Options class.
Command Line Parser shows this example in the help screen which is
outputted whenever there are errors in the command line, or when the
<code>--help</code> option is specified.</p>
<pre class="csharp"><code class="csharp">				<span class="keyword" data-toggle="tooltip" title="CommandLine.Text.Example">new</span> <span class="typename">Example</span> <span class="punctuation">(</span><span class="string" data-toggle="tooltip" title="string">&quot;Generate markdown documentation for a solution&quot;</span><span class="punctuation">,</span>
					<span class="keyword" data-toggle="tooltip" title="CommandLine.UnParserSettings">new</span> <span class="typename">UnParserSettings</span>
					<span class="punctuation">{</span>
						<span data-toggle="tooltip" title="bool">PreferShortName</span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="bool">GroupSwitches</span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span>
					<span class="punctuation">}</span><span class="punctuation">,</span>
					<span class="keyword" data-toggle="tooltip" title="LiterateCS.Options">new</span> <span class="typename"><a href="../LiterateCS/Options.html#LiterateCS.Options">Options</a></span>
					<span class="punctuation">{</span>
						<span data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>"><a href="../LiterateCS/Options.html#LiterateCS.Options.Filters">Filters</a></span> <span class="punctuation" data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>">=</span> <span class="keyword" data-toggle="tooltip" title="string[]">new</span> <span class="keyword" data-toggle="tooltip" title="string">string</span><span class="punctuation">[</span><span data-toggle="tooltip" title="?"></span><span class="punctuation">]</span> <span class="punctuation">{</span> <span class="string" data-toggle="tooltip" title="string">&quot;**.cs&quot;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;**.md&quot;</span> <span class="punctuation">}</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.Solution">Solution</a></span> <span class="punctuation" data-toggle="tooltip" title="string">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;&lt;solution&gt;.sln&quot;</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.OutputFolder">OutputFolder</a></span> <span class="punctuation" data-toggle="tooltip" title="string">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;docs&quot;</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="LiterateCS.OutputFormat"><a href="../LiterateCS/Options.html#LiterateCS.Options.Format">Format</a></span> <span class="punctuation" data-toggle="tooltip" title="LiterateCS.OutputFormat">=</span> <span class="typename" data-toggle="tooltip" title="LiterateCS.OutputFormat"><a href="../LiterateCS/Options.html#LiterateCS.OutputFormat">OutputFormat</a></span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.OutputFormat">.</span><span data-toggle="tooltip" title="LiterateCS.OutputFormat"><a href="../LiterateCS/Options.html#LiterateCS.OutputFormat.md">md</a></span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="bool"><a href="../LiterateCS/Options.html#LiterateCS.Options.Trim">Trim</a></span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span>
					<span class="punctuation">}</span><span class="punctuation">)</span><span class="punctuation">,</span>
</code></pre>
<h3 id="create-html-output-from-files-in-a-directory">Create HTML Output from Files in a Directory</h3>
<p>The example below scans the subfolder &quot;src&quot; for C# files, and the root folder
for markdown files. It produces HTML and outputs information to console for
each processed file (verbose option).</p>
<p><strong>Note:</strong> Since we are just reading individual files C# files inside a directory
and do not provide a solution file, LiterateCS cannot use Roslyn to compile the
code and produce semantic information. So, the syntax highlighting is limited
to basic tokens, and the links and type information is not available in the
produced HTML files.</p>
<pre><code>literatecs src\*.cs *.md -i &lt;root&gt; -o docs -f html -tv
</code></pre>
<pre class="csharp"><code class="csharp">				<span class="keyword" data-toggle="tooltip" title="CommandLine.Text.Example">new</span> <span class="typename">Example</span> <span class="punctuation">(</span><span class="string" data-toggle="tooltip" title="string">&quot;Create HTML documentation from files in a directory&quot;</span><span class="punctuation">,</span>
					<span class="keyword" data-toggle="tooltip" title="CommandLine.UnParserSettings">new</span> <span class="typename">UnParserSettings</span>
					<span class="punctuation">{</span>
						<span data-toggle="tooltip" title="bool">PreferShortName</span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="bool">GroupSwitches</span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span>
					<span class="punctuation">}</span><span class="punctuation">,</span>
					<span class="keyword" data-toggle="tooltip" title="LiterateCS.Options">new</span> <span class="typename"><a href="../LiterateCS/Options.html#LiterateCS.Options">Options</a></span>
					<span class="punctuation">{</span>
						<span data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>"><a href="../LiterateCS/Options.html#LiterateCS.Options.Filters">Filters</a></span> <span class="punctuation" data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>">=</span> <span class="keyword" data-toggle="tooltip" title="string[]">new</span> <span class="keyword" data-toggle="tooltip" title="string">string</span><span class="punctuation">[</span><span data-toggle="tooltip" title="?"></span><span class="punctuation">]</span> <span class="punctuation">{</span> <span class="string" data-toggle="tooltip" title="string">&quot;src\\*.cs&quot;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;*.md&quot;</span> <span class="punctuation">}</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.InputFolder">InputFolder</a></span> <span class="punctuation" data-toggle="tooltip" title="string">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;&lt;root&gt;&quot;</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.OutputFolder">OutputFolder</a></span> <span class="punctuation" data-toggle="tooltip" title="string">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;docs&quot;</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="LiterateCS.OutputFormat"><a href="../LiterateCS/Options.html#LiterateCS.Options.Format">Format</a></span> <span class="punctuation" data-toggle="tooltip" title="LiterateCS.OutputFormat">=</span> <span class="typename" data-toggle="tooltip" title="LiterateCS.OutputFormat"><a href="../LiterateCS/Options.html#LiterateCS.OutputFormat">OutputFormat</a></span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.OutputFormat">.</span><span data-toggle="tooltip" title="LiterateCS.OutputFormat"><a href="../LiterateCS/Options.html#LiterateCS.OutputFormat.html">html</a></span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="bool"><a href="../LiterateCS/Options.html#LiterateCS.Options.Trim">Trim</a></span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="bool"><a href="../LiterateCS/Options.html#LiterateCS.Options.Verbose">Verbose</a></span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span>
					<span class="punctuation">}</span><span class="punctuation">)</span><span class="punctuation">,</span>
</code></pre>
<h3 id="create-html-output-for-a-solution">Create HTML Output for a Solution</h3>
<p>The last example uses all the available functionality. It produces documentation
for the LiterateCS tool itself. It specifies the solution file, and processes C#
files under &quot;src&quot; subdirectory, along with the markdown files under the solution
directory.</p>
<p>Table of contents file is updated while the files are processed. This is specified
with the <code>-u</code> switch.</p>
<pre><code>literatecs src\*.cs *.md -s &lt;solution&gt;.sln -o docs -f html -tuv
</code></pre>
<pre class="csharp"><code class="csharp">				<span class="keyword" data-toggle="tooltip" title="CommandLine.Text.Example">new</span> <span class="typename">Example</span> <span class="punctuation">(</span><span class="string" data-toggle="tooltip" title="string">&quot;Create HTML documentation for a solution&quot;</span><span class="punctuation">,</span>
					<span class="keyword" data-toggle="tooltip" title="CommandLine.UnParserSettings">new</span> <span class="typename">UnParserSettings</span>
					<span class="punctuation">{</span>
						<span data-toggle="tooltip" title="bool">PreferShortName</span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="bool">GroupSwitches</span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span>
					<span class="punctuation">}</span><span class="punctuation">,</span>
					<span class="keyword" data-toggle="tooltip" title="LiterateCS.Options">new</span> <span class="typename"><a href="../LiterateCS/Options.html#LiterateCS.Options">Options</a></span>
					<span class="punctuation">{</span>
						<span data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>"><a href="../LiterateCS/Options.html#LiterateCS.Options.Filters">Filters</a></span> <span class="punctuation" data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>">=</span> <span class="keyword" data-toggle="tooltip" title="string[]">new</span> <span class="keyword" data-toggle="tooltip" title="string">string</span><span class="punctuation">[</span><span data-toggle="tooltip" title="?"></span><span class="punctuation">]</span> <span class="punctuation">{</span> <span class="string" data-toggle="tooltip" title="string">&quot;src\\*.cs&quot;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;*.md&quot;</span> <span class="punctuation">}</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.Solution">Solution</a></span> <span class="punctuation" data-toggle="tooltip" title="string">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;&lt;solution&gt;.sln&quot;</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.OutputFolder">OutputFolder</a></span> <span class="punctuation" data-toggle="tooltip" title="string">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;docs&quot;</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="LiterateCS.OutputFormat"><a href="../LiterateCS/Options.html#LiterateCS.Options.Format">Format</a></span> <span class="punctuation" data-toggle="tooltip" title="LiterateCS.OutputFormat">=</span> <span class="typename" data-toggle="tooltip" title="LiterateCS.OutputFormat"><a href="../LiterateCS/Options.html#LiterateCS.OutputFormat">OutputFormat</a></span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.OutputFormat">.</span><span data-toggle="tooltip" title="LiterateCS.OutputFormat"><a href="../LiterateCS/Options.html#LiterateCS.OutputFormat.html">html</a></span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="bool"><a href="../LiterateCS/Options.html#LiterateCS.Options.Trim">Trim</a></span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="bool"><a href="../LiterateCS/Options.html#LiterateCS.Options.UpdateToc">UpdateToc</a></span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="bool"><a href="../LiterateCS/Options.html#LiterateCS.Options.Verbose">Verbose</a></span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span>
					<span class="punctuation">}</span><span class="punctuation">)</span><span class="punctuation">,</span>
</code></pre>
<p><strong>Tip:</strong> If you think the command line above is a bit dense, you can also use the
long format for the options to make them more understandable. The options are
case-insensitive, so you can write them in any way you like.</p>
<pre><code>literatecs src\*.cs *.md --solution &lt;solution&gt;.sln --output docs --format html --trim --UpdateTOC --verbose 
</code></pre>
<pre class="csharp"><code class="csharp">				<span class="keyword" data-toggle="tooltip" title="CommandLine.Text.Example">new</span> <span class="typename">Example</span> <span class="punctuation">(</span><span class="string" data-toggle="tooltip" title="string">&quot;Same example with long option names&quot;</span><span class="punctuation">,</span>
					<span class="keyword" data-toggle="tooltip" title="LiterateCS.Options">new</span> <span class="typename"><a href="../LiterateCS/Options.html#LiterateCS.Options">Options</a></span>
					<span class="punctuation">{</span>
						<span data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>"><a href="../LiterateCS/Options.html#LiterateCS.Options.Filters">Filters</a></span> <span class="punctuation" data-toggle="tooltip" title="System.Collections.Generic.IEnumerable<string>">=</span> <span class="keyword" data-toggle="tooltip" title="string[]">new</span> <span class="keyword" data-toggle="tooltip" title="string">string</span><span class="punctuation">[</span><span data-toggle="tooltip" title="?"></span><span class="punctuation">]</span> <span class="punctuation">{</span> <span class="string" data-toggle="tooltip" title="string">&quot;src\\*.cs&quot;</span><span class="punctuation">,</span> <span class="string" data-toggle="tooltip" title="string">&quot;*.md&quot;</span> <span class="punctuation">}</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.Solution">Solution</a></span> <span class="punctuation" data-toggle="tooltip" title="string">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;&lt;solution&gt;.sln&quot;</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="string"><a href="../LiterateCS/Options.html#LiterateCS.Options.OutputFolder">OutputFolder</a></span> <span class="punctuation" data-toggle="tooltip" title="string">=</span> <span class="string" data-toggle="tooltip" title="string">&quot;docs&quot;</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="LiterateCS.OutputFormat"><a href="../LiterateCS/Options.html#LiterateCS.Options.Format">Format</a></span> <span class="punctuation" data-toggle="tooltip" title="LiterateCS.OutputFormat">=</span> <span class="typename" data-toggle="tooltip" title="LiterateCS.OutputFormat"><a href="../LiterateCS/Options.html#LiterateCS.OutputFormat">OutputFormat</a></span><span class="punctuation" data-toggle="tooltip" title="LiterateCS.OutputFormat">.</span><span data-toggle="tooltip" title="LiterateCS.OutputFormat"><a href="../LiterateCS/Options.html#LiterateCS.OutputFormat.html">html</a></span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="bool"><a href="../LiterateCS/Options.html#LiterateCS.Options.Trim">Trim</a></span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="bool"><a href="../LiterateCS/Options.html#LiterateCS.Options.UpdateToc">UpdateToc</a></span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span><span class="punctuation">,</span>
						<span data-toggle="tooltip" title="bool"><a href="../LiterateCS/Options.html#LiterateCS.Options.Verbose">Verbose</a></span> <span class="punctuation" data-toggle="tooltip" title="bool">=</span> <span class="keyword" data-toggle="tooltip" title="bool">true</span>
					<span class="punctuation">}</span><span class="punctuation">)</span>
			<span class="punctuation">}</span><span class="punctuation">;</span>
	<span class="punctuation">}</span>
<span class="punctuation">}</span>
</code></pre>

				</div>
				<ul class="pager">
	<li class="previous"><a href="../Introduction.html">Previous: Introduction</a></li>
	<li class="next"><a href="../LiterateCS/Program.html">Next: Main Program</a></li>
</ul>
			</div>
        </div>
    </div>
    
    <footer class="panel-footer text-center">
        <div align="center">Copyright © 2018 Tommi Johtela</div>
		<div align="right">
			<small>
				Documentation created with <a href="https://johtela.github.io/LiterateCS/">LiterateCS</a>.
			</small>
		</div>
    </footer>


    
    <script src="../bootstrap/js/jquery.min.js"></script>
    <script src="../bootstrap/js/bootstrap.min.js"></script>
    <script src="../sidebar/sidebar.js"></script>
    <script src="../syntax-highlight/syntax.js"></script>
    <script type="text/x-mathjax-config">
        MathJax.Hub.Config({
        extensions: ["jsMath2jax.js"]
        });
    </script>
    <script src='https://cdnjs.cloudflare.com/ajax/libs/mathjax/2.7.0/MathJax.js?config=TeX-AMS_HTML'></script>
	<script src="../mermaid/mermaid.min.js"></script>
	<script>mermaid.initialize({startOnLoad:true});</script>

</body>
</html>